package com.blockmeta.bbs.immodule.adapter;

import androidx.annotation.Nullable;
import androidx.recyclerview.widget.RecyclerView;

import com.blockmeta.bbs.baselibrary.base.adapter.BaseAdapter;
import com.blockmeta.bbs.baselibrary.utils.LoadPicUtil;
import com.blockmeta.bbs.businesslibrary.widget.CircleImageView;
import com.blockmeta.bbs.immodule.R;
import com.blockmeta.bbs.immodule.bean.databean.UserBean;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.List;

/**
 * @author AirThor
 * @date 2019/3/6.
 */
public class CustomerServiceAdapter extends BaseAdapter<UserBean, BaseViewHolder> {


    public CustomerServiceAdapter(int layoutResId, @Nullable List<UserBean> data) {
        super(layoutResId, data);
    }

    @Override
    public void bindToRecyclerView(RecyclerView recyclerView) {
        super.bindToRecyclerView(recyclerView);
    }

    @Override
    protected void convert(BaseViewHolder helper, final UserBean item) {
        CircleImageView avatar = helper.getView(R.id.contacts_avatar);
        LoadPicUtil.loadWithPicasso(avatar, item.getLogo());

        helper.setText(R.id.contacts_name,item.getName());
    }


}
